import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useTokenStore = defineStore(
  'token',
  () => {
    const token = ref('123')

    const setToken = (val: string) => {
      token.value = val
    }

    const clearToken = () => {
      token.value = ''
    }

    return { token, setToken, clearToken }
  },
  { persist: true },
)
